There is a conventional technique using an ultrasonic sensor or an optical distance sensor to measure a distance between the sensor and an object and thereby measure the length, width and height of the object. For a device using the technique for measuring each of sides of a cuboid or rectangular parallelepiped, there is a technique in which a wire is used for measuring a distance between two points of a diagonal line of the object and the ultrasonic sensor is used for measuring the height of the object and an angle between the diagonal line and a wall is calculated on the basis of calculation of an angle between the wire and the wall. In addition, as a technique for measuring the circumference of an ellipse, there is a technique in which a frame with optical distance sensors arrayed on the frame are used for measuring lengths of major and minor axes of the ellipse, thereby an outer circumference and a cross-sectional area of the ellipse are obtained.
Japanese Laid-open Patent Publications Nos. 06-331342, 2005-315820, and 2008-145321 are examples of related art.